home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 22
/
Amiga Format AFCD22 (Jan 1998, Issue 106).iso
/
-seriously_amiga-
/
shareware
/
programming
/
other
/
modemlink
/
source
/
lib
/
smakefile
< prev
Wrap
Makefile
|
1997-11-05
|
5KB
|
145 lines
##
## Makefile for modemlink.device and modemlink.lib.
## Since modemlink was designed to be both a device and linked library
## creating a makefile that would generate both at the same time was
## a little tricky.
##
## There are some modules that are used by both the device and lib (Modem.c,
## Link.c, ModemLinkTask.c, ModemLinkDevAPI.c, CRC.c and DeviceStuff.c), some
## that are only used by the device (ModemLinkDev.c) and some only used by the
## linked library version (ModemTags.c, LinkTags.c and ModemLinkAPI.c).
##
## All the modules for the device are compiled with the libcode option on,
## while the linked library modules are not. Since many modules are shared
## the object modules are put into two different directories. The device
## modules are put into dev/ while the linked lib ones are put into lib/. The
## only modules that are not put into one of these two directories are CRC.c
## and DeviceStuff.c because they work fine the way they are compiled in both
## versions.
DPATH = dev/
LPATH = lib/
DEVOPTS = libcode
LIBOPTS =
DEVLIBS = $(DPATH)Modem.o $(DPATH)Link.o $(DPATH)ModemLinkTask.o \
$(DPATH)ModemLinkDevAPI.o $(DPATH)ModemLinkDev.o CRC.o \
DeviceStuff.o
LIBS = $(LPATH)Modem.o $(LPATH)Link.o $(LPATH)ModemLinkTask.o \
$(LPATH)ModemLinkDevAPI.o $(LPATH)ModemLinkAPI.o \
$(LPATH)ModemTags.o $(LPATH)LinkTags.o CRC.o DeviceStuff.o
LIBDEVLIBS = $(DPATH)ModemDevTags.o $(DPATH)LinkDevTags.o
all: modemlink.device ModemLinkDev.lib ModemLink.lib
clean:
delete \#?.o \#?.lnk \#?.lib \#?.device dev/\#?.o lib/\#?.o
##
## use these to copy the device and lib(s) to the standard distribution
## directories. These are mainly used when testing or about to release
## modemlink.
##
update000:
copy modemlink.lib /lib/ModemLink_000.lib
copy modemlinkdev.lib /lib/ModemLinkDev.lib
copy modemlink.device /Devs/modemlink_000.device
update020:
copy modemlink.lib /lib/ModemLink_020.lib
copy modemlink.device /Devs/modemlink_020.device
##
## here's the modules user programs will need to interface with:
##
modemlink.device: $(DEVLIBS) ModemLinkDev_pragmas.h
slink with <<
from lib:devent.o lib:devinitr.o $(DEVLIBS)
lib lib:sc.lib
libVersion 36
libRevision 2
to modemlink.device
libfd ModemLinkDev.fd
<
ModemLinkDev_pragmas.h: ModemLinkDev.fd
fd2pragma ModemLinkDev.fd ModemLinkDev_pragmas.h
ModemLinkDev.lib: $(LIBDEVLIBS)
oml ModemLinkDev.lib r $(LIBDEVLIBS)
ModemLink.lib: $(LIBS)
oml ModemLink.lib r $(LIBS)
##
## Following modules used for device routines
##
$(DPATH)ModemLinkDev.o: ModemLinkDev.c
sc $(DEVOPTS) ModemLinkDev.c nolink objname $(DPATH)ModemLinkDev.o
$(DPATH)Link.o: Link.c Link.h CRC.h DeviceStuff.h
sc $(DEVOPTS) Link.c nolink objname $(DPATH)Link.o
$(DPATH)LinkDevTags.o: LinkDevTags.c LinkDevTags.h Link.h ModemLinkDev_pragmas.h
sc LinkDevTags.c nolink objname $(DPATH)LinkDevTags.o
$(DPATH)Modem.o: Modem.c Modem.h CRC.h DeviceStuff.h
sc $(DEVOPTS) Modem.c nolink objname $(DPATH)Modem.o
$(DPATH)ModemDevTags.o: ModemDevTags.c ModemDevTags.h Modem.h ModemLinkDev_pragmas.h
sc ModemDevTags.c nolink objname $(DPATH)ModemDevTags.o
$(DPATH)ModemLinkTask.o: ModemLinkTask.c ModemLinkTask.h Modem.h Link.h DeviceStuff.h
sc $(DEVOPTS) ModemLinkTask.c nolink objname $(DPATH)ModemLinkTask.o
$(DPATH)ModemLinkAPI.o: ModemLinkAPI.c ModemLinkAPI.h ModemLinkDevAPI.h
sc $(DEVOPTS) ModemLinkAPI.c nolink objname $(DPATH)ModemLinkAPI.o
$(DPATH)ModemLinkDevAPI.o: ModemLinkDevAPI.c ModemLinkDevAPI.h
sc $(DEVOPTS) ModemLinkDevAPI.c nolink objname $(DPATH)ModemLinkDevAPI.o
##
## Following modules used for lib routines
##
$(LPATH)Link.o: Link.c Link.h CRC.h DeviceStuff.h
sc Link.c nolink objname $(LPATH)Link.o
$(LPATH)LinkTags.o: LinkTags.c LinkTags.h Link.h
sc LinkTags.c nolink objname $(LPATH)LinkTags.o
$(LPATH)Modem.o: Modem.c Modem.h CRC.h DeviceStuff.h
sc Modem.c nolink objname $(LPATH)Modem.o
$(LPATH)ModemTags.o: ModemTags.c ModemTags.h Modem.h
sc ModemTags.c nolink objname $(LPATH)ModemTags.o
$(LPATH)ModemLinkTask.o: ModemLinkTask.c ModemLinkTask.h Modem.h Link.h DeviceStuff.h
sc ModemLinkTask.c nolink objname $(LPATH)ModemLinkTask.o
$(LPATH)ModemLinkAPI.o: ModemLinkAPI.c ModemLinkAPI.h ModemLinkDevAPI.h
sc ModemLinkAPI.c nolink objname $(LPATH)ModemLinkAPI.o
$(LPATH)ModemLinkDevAPI.o: ModemLinkDevAPI.c ModemLinkDevAPI.h
sc ModemLinkDevAPI.c nolink objname $(LPATH)ModemLinkDevAPI.o
##
## Following routines used by both the device and lib modules
##
CRC.o: CRC.c CRC.h
sc CRC.c nolink objname CRC.o
DeviceStuff.o: DeviceStuff.c DeviceStuff.h
sc DeviceStuff.c nolink objname DeviceStuff.o